Component({
  options: {
    styleIsolation: 'shared'
  },
  data: {
    active: 'index',
    menuObj: {
      index: '/pages/index/index',
      product: '/pages/product/index',
      material: '/pages/material/index',
      home: '/pages/home/index',
    }
  },
  methods: {
    onChange(e) {
      const url = this.data.menuObj[e.detail]
      wx.switchTab({url})
    },
  }
})
